﻿<Page
    x:Name="pageRoot"
    x:Class="Instemote.LoginPage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Instemote"
    xmlns:common="using:Instemote.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>
        <!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
        <x:String x:Key="AppName">My Application</x:String>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>
        
        <StackPanel Grid.Row="1" Margin="120,0,120,0" Width="700">
            <TextBlock x:Name="pageTitle" Text="Log In" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" 
                        IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,36,30,40"/>
            
            <TextBlock FontSize="23" HorizontalAlignment="Left" Text="Welcome to Instemote! Instemote is a client for the Insteon Hub home control system. The app can only control your devices, it can't setup or configure the system. You must have you account and hub setup from another device before using this app. Enjoy!" TextWrapping="Wrap" Margin="0,0,0,12" Foreground="#989898"  />

            <StackPanel HorizontalAlignment="Center" Margin="0,24,0,0">
                <TextBlock Text="Email" Foreground="#0B6CF8" FontSize="28" />
                <TextBox x:Name="EmailBox" Margin="0,12,0,12" Width="400" HorizontalAlignment="Center" TextChanged="EmailBox_TextChanged" FontSize="22" Height="35" Padding="1" />
                <TextBlock Text="Password" Foreground="#0B6CF8" FontSize="28" />
                <PasswordBox x:Name="PasswordBox" Margin="0,12,0,12" Width="400" HorizontalAlignment="Center" PasswordChanged="PasswordBox_PasswordChanged" FontSize="22" Height="35"  Padding="1" KeyDown="PasswordBox_KeyDown"/>
                <Button x:Name="LoginButton" FontSize="21" Content="log in" HorizontalAlignment="Stretch" Margin="-3,24" Tapped="LoginButton_Tapped" IsEnabled="False"/>
            </StackPanel>
        </StackPanel>

        <ProgressBar VerticalAlignment="Top" x:Name="ProgressBar" Visibility="Collapsed">
          
        </ProgressBar>
    </Grid>
</Page>
